<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Create new entity reference node</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="domdocument.createelementns.html">DOMDocument::createElementNS</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="domdocument.createprocessinginstruction.html">DOMDocument::createProcessingInstruction</a></div>
 <div class="up"><a href="class.domdocument.html">DOMDocument</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="domdocument.createentityreference" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">DOMDocument::createEntityReference</h1>
  <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">DOMDocument::createEntityReference</span> &mdash; <span class="dc-title">Create new entity reference node</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-domdocument.createentityreference-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type"><a href="class.domentityreference.html" class="type DOMEntityReference">DOMEntityReference</a></span> <span class="methodname"><strong>DOMDocument::createEntityReference</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   )</div>

  <p class="para rdfs-comment">
   This function creates a new instance of class
   <a href="class.domentityreference.html" class="classname">DOMEntityReference</a>. 此节点出现在文档中，除非是用诸如
<span class="function"><a href="domnode.appendchild.html" class="function">DOMNode->appendChild()</a></span> 等函数来将其插入。
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-domdocument.createentityreference-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">name</code></em></dt>

     <dd>

      <p class="para">
       The content of the entity reference, e.g. the entity reference minus
       the leading <em>&amp;</em> and the trailing
       <em>;</em> characters.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-domdocument.createentityreference-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   The new <a href="class.domentityreference.html" class="classname">DOMEntityReference</a> or <strong><code>FALSE</code></strong> if an error
   occurred.
  </p>
 </div>

 <div class="refsect1 errors" id="refsect1-domdocument.createentityreference-errors">
  <h3 class="title">错误／异常</h3>
  <p class="para">
   <dl>

    
     <dt>
<strong><code>DOM_INVALID_CHARACTER_ERR</code></strong></dt>

     <dd>

      <p class="para">
       Raised if <em><code class="parameter">name</code></em> contains an invalid character.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-domdocument.createentityreference-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="methodname"><a href="domnode.appendchild.html" class="methodname" rel="rdfs-seeAlso">DOMNode::appendChild()</a> - Adds new child at the end of the children</span></li>
    <li class="member"><span class="methodname"><a href="domdocument.createattribute.html" class="methodname" rel="rdfs-seeAlso">DOMDocument::createAttribute()</a> - Create new attribute</span></li>
    <li class="member"><span class="methodname"><a href="domdocument.createattributens.html" class="methodname" rel="rdfs-seeAlso">DOMDocument::createAttributeNS()</a> - Create new attribute node with an associated namespace</span></li>
    <li class="member"><span class="methodname"><a href="domdocument.createcdatasection.html" class="methodname" rel="rdfs-seeAlso">DOMDocument::createCDATASection()</a> - Create new cdata node</span></li>
    <li class="member"><span class="methodname"><a href="domdocument.createcomment.html" class="methodname" rel="rdfs-seeAlso">DOMDocument::createComment()</a> - Create new comment node</span></li>
    <li class="member"><span class="methodname"><a href="domdocument.createdocumentfragment.html" class="methodname" rel="rdfs-seeAlso">DOMDocument::createDocumentFragment()</a> - Create new document fragment</span></li>
    <li class="member"><span class="methodname"><a href="domdocument.createelement.html" class="methodname" rel="rdfs-seeAlso">DOMDocument::createElement()</a> - Create new element node</span></li>
    <li class="member"><span class="methodname"><a href="domdocument.createelementns.html" class="methodname" rel="rdfs-seeAlso">DOMDocument::createElementNS()</a> - Create new element node with an associated namespace</span></li>
    <li class="member"><span class="methodname"><a href="domdocument.createprocessinginstruction.html" class="methodname" rel="rdfs-seeAlso">DOMDocument::createProcessingInstruction()</a> - Creates new PI node</span></li>
    <li class="member"><span class="methodname"><a href="domdocument.createtextnode.html" class="methodname" rel="rdfs-seeAlso">DOMDocument::createTextNode()</a> - Create new text node</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="domdocument.createelementns.html">DOMDocument::createElementNS</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="domdocument.createprocessinginstruction.html">DOMDocument::createProcessingInstruction</a></div>
 <div class="up"><a href="class.domdocument.html">DOMDocument</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
